#老师有年龄，学校，姓名的属性，有上课和自我介绍的方法，如果年龄少于22岁，抛出异常。
class teacher:
    def __init__(self,name,age,school):
        self.name=name
        self.age=age
        self.school=school
        if self.age < 22:
            raise TypeError('age')

    def introduce(self):
        return self.name,self.age,self.school
if __name__ == "__main__":
    a = teacher('sb',21,'sjtu')
    print(a.introduce())